package com.koron.system.userOrg.mapper;

import com.koron.system.userOrg.bean.po.AppUserOrgPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (AppUserOrg)表数据库访问层
 *
 * @author zhouj
 * @since 2021-11-22 09:04:42
 */
@Mapper
@Repository
public interface AppUserOrgMapper {

    int insertOrUpdate(AppUserOrgPo appUserOrg);

    int insertOrUpdateBatch(@Param("list") List<AppUserOrgPo> appUserOrgList);

    int insert(AppUserOrgPo appUserOrg);

    int insertBatch(@Param("list") List<AppUserOrgPo> appUserOrgList);

    int update(AppUserOrgPo appUserOrg);

    int deleteById(String id);

    int deleteByAccount(String account);

    int deleteByAccountList(@Param("accountList") List<String> accountList,@Param("orgId") String orgId);

    AppUserOrgPo queryById(String id);

    List<AppUserOrgPo> queryList(AppUserOrgPo appUserOrg);

    List<AppUserOrgPo> queryByAccountList(@Param("accountList") List<String> accountList);

    int deleteByAccountOrg(@Param("account") String account, @Param("orgId") String orgId);

}